import { createRouter, createWebHashHistory  } from 'vue-router'
import EspSerialView from '../views/EspSerialView.vue'

const router = createRouter({
  history: createWebHashHistory ('/'),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/serial'
    },
    {
      path: '/serial',
      name: 'serial',
      component: EspSerialView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
  ],
})

export default router
